# $Id: PKGBUILD 82362 2013-01-16 10:08:50Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Neil Darlow <neil@darlow.co.uk>
# Contributor: Jens Maucher <defcon@archlinux.us>

pkgname=freehdl
pkgver=0.0.8
pkgrel=5
pkgdesc='An open-source (C++ generating) VHDL simulator'
arch=('i686' 'x86_64')
url='http://freehdl.seul.org'
license=('GPL')
depends=('perl')
optdepends=('gtkwave: to view output when run standalone')
options=('libtool')
install=${pkgname}.install
source=("http://downloads.sourceforge.net/qucs/$pkgname-$pkgver.tar.gz")
md5sums=('aa1382b8b5c6a972e9652c648a9278b5')

build() {
  cd "${srcdir}"/$pkgname-$pkgver
  sed -i 's|my $cpplibs = .*|my $cpplibs = "-lm -lfreehdl-kernel -lfreehdl-std";|g' v2cc/gvhdl-local v2cc/gvhdl.in
  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
